package zhtt.oneToMany4_oneself;

import java.util.HashSet;
import java.util.Set;

/**
 * Created by zhtt on 2017/4/11.
 * 新闻栏目
 */
public class Column {

    private int id;

    private String name;

    /**
     * 父栏目
     */
    private Column parentColumn;

    /**
     * 子栏目
     */
    private Set<Column> childColumn;

    public Column(String name) {
        this.name = name;
        if(childColumn==null){
            childColumn=new HashSet<Column>();
        }
    }

    public Column() {
        childColumn=new HashSet<Column>();
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Column getParentColumn() {
        return parentColumn;
    }

    public void setParentColumn(Column parentColumn) {
        this.parentColumn = parentColumn;
    }

    public Set<Column> getChildColumn() {
        return childColumn;
    }

    public void setChildColumn(Set<Column> childColumn) {
        this.childColumn = childColumn;
    }
}
